<template>
  <Detail :detaiData="detailData" :subWorkId="subWorkId"></Detail>
</template>
<script>
import Detail from './components/detail.vue';
import { getWorkDetail } from '@/api/dock/trucks';
export default {
  components: {
    Detail,
  },
  data() {
    return {
      detailData: {},
      subWorkId: '',
    };
  },
  onLoad(option) {
    this.subWorkId = option.subWorkId;
    getWorkDetail(this.subWorkId).then(({ data }) => {
      this.detailData = data;
    });
  },
};
</script>
